Simulink
This example shows some tests and assessments for the lights control system that is implemented and tested in Simulink.
The platform configuration has already been set up for Simulink.
Five tests are designed using a very simple automaton. The most important steps like Channel step, Ramp step, Table step, Wait step and Compare step are used to design a set of test scenarios. Most tests are assessed by Compare steps.
The Trigger rule assesslet checks if the headlight is on when the light switch is set to on. A similar check is implemented as a script to check if the headlight is off when the switch is set to off.
The following steps were done to build these tests:
- Create a new file and save it.
- Add a MATLAB platform to specify the SUT as Simulink system.
- In the MATLAB Platform Configuration, select the original model file to be tested, the subsystem to be tested, import the mapping / interface and build the test frame.
- Create the different test cases using steps.
- Create a test set if needed or execute all tests.
- Execute the tests.
See MATLAB/Simulink Platform for more information.